package com.ayz.gateway.common.notify;

import java.util.EventObject;

/**
 * 所有实现都继承自应用程序事件，其实一切事件的父类
 */
public abstract class ApplicationEvent extends EventObject {
    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */

    private static final long serialVersionUID = 7099057708183571937L;

    private final long timestamp;//该事件发生的系统时间

    public ApplicationEvent(Object source) {
        super(source);
        timestamp=System.currentTimeMillis();
    }

    public final long getTimestamp() {
        return timestamp;
    }
}
